package API.DAY3.collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo3 {
    public static void main(String[] args) {
        Collection a = new ArrayList<>();
//        a.add(123);
        Point p = new Point(1,2);
        a.add(p);
        System.out.println(p);
        System.out.println(a);

        p.setX(123);
        System.out.println(p);
        System.out.println(a);
    }
}
